package com.zz.inventory.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 优惠卷使用对象 coupon_usage
 * 
 * @author zz
 * @date 2025-07-07
 */
public class CouponUsage extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录ID */
    private Long id;

    /** 关联优惠券 */
    @Excel(name = "关联优惠券")
    private Long couponId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 领取时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "领取时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receiveTime;

    /** 激活时间（NULL=未激活） */
    @Excel(name = "激活时间", readConverterExp = "N=ULL=未激活")
    private Date activateTime;

    /** 过期时间（根据激活时间计算） */
    @Excel(name = "过期时间", readConverterExp = "根=据激活时间计算")
    private Date expireTime;

    /** 状态：0=未激活，1=激活中，2=已过期，3=已使用 */
    @Excel(name = "状态：0=未激活，1=激活中，2=已过期，3=已使用")
    private Integer status;
    private Long schoolId;

    public Long getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Long schoolId) {
        this.schoolId = schoolId;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setCouponId(Long couponId) 
    {
        this.couponId = couponId;
    }

    public Long getCouponId() 
    {
        return couponId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setReceiveTime(Date receiveTime) 
    {
        this.receiveTime = receiveTime;
    }

    public Date getReceiveTime() 
    {
        return receiveTime;
    }

    public void setActivateTime(Date activateTime) 
    {
        this.activateTime = activateTime;
    }

    public Date getActivateTime() 
    {
        return activateTime;
    }

    public void setExpireTime(Date expireTime) 
    {
        this.expireTime = expireTime;
    }

    public Date getExpireTime() 
    {
        return expireTime;
    }

    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("couponId", getCouponId())
            .append("userId", getUserId())
            .append("receiveTime", getReceiveTime())
            .append("activateTime", getActivateTime())
            .append("expireTime", getExpireTime())
            .append("status", getStatus())
                .append("schoolId",getSchoolId())
            .toString();
    }
}
